package com.example.friend.dao;

import java.sql.SQLException;

import org.junit.Test;

import com.example.friend.pojo.User;

import junit.framework.TestCase;

public class TestDemo {

	@Test
	public void test1() throws SQLException
	{
		UserDAO dao = new UserDAO();
		
		User u = new User();
		u.setUsername("zhangsan");
		u.setUsername("123456");
		
		int result = dao.insert(u);
		
		// 断言
		TestCase.assertTrue(result==1);
	}
}


// JUnit